package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;
import java.sql.Blob;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author demo
 * @since 2025-02-28
 */
public class Search implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 发布者账号
     */
    @TableField("owner_no")
    private String ownerNo;

    /**
     * 详细描述
     */
    private String content;

    /**
     * 丢失时间
     */
    private LocalDateTime loseTime;

    /**
     * 丢失地点
     */
    private String location;

    /**
     * 丢失宠物类别
     */
    private String loseType;

    /**
     * 小动物图片二进制数据
     */
    private byte[] petImage;

    /**
     * 图片类型: image/png/image/jpeg
     */
    private String imageType;
    /**
     * 昵称
     */
    @TableField("pet_name")
    private String petName;
    /**
     * 联系电话
     */
    @TableField("phone_num")
    private String phoneNum;

    /**
     * 处理状态：0-正常 1-已提交申请取消 2-已处理
     */
    private Integer status;


    @TableField("related_id")
    private Long relatedId;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getOwnerNo() {
        return ownerNo;
    }

    public void setOwnerNo(String ownerNo) {
        this.ownerNo = ownerNo;
    }
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
    public LocalDateTime getLoseTime() {
        return loseTime;
    }

    public void setLoseTime(LocalDateTime loseTime) {
        this.loseTime = loseTime;
    }
    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }
    public String getLoseType() {
        return loseType;
    }

    public void setLoseType(String loseType) {
        this.loseType = loseType;
    }
    public byte[] getPetImage() {
        return petImage;
    }

    public void setPetImage(byte[] petImage) {
        this.petImage = petImage;
    }
    public String getImageType() {
        return imageType;
    }

    public void setImageType(String imageType) {
        this.imageType = imageType;
    }

    public String getPetName() {
        return petName;
    }

    public void setPetName(String petName) {
        this.petName = petName;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getRelatedId() { return relatedId; }
    public void setRelatedId(Long relatedId) { this.relatedId = relatedId; }
    @Override
    public String toString() {
        return "Search{" +
            "id=" + id +
            ", ownerNo=" + ownerNo +
            ", content=" + content +
            ", loseTime=" + loseTime +
            ", location=" + location +
            ", loseType=" + loseType +
            ", petImage=" + petImage +
            ", imageType=" + imageType +
            ", petName=" + petName +
            ", phone_num=" + phoneNum +
            ", status=" + status +
            ", relatedId=" + relatedId +
        "}";
    }
}
